<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		*{
			margin: 0;
			padding: 0;
			list-style: none;
		}
		#box{
			height: 450px;
			width: 420px;
			border: 1px solid red;
		}
		input{
			width: 140px;
			height: 50px;
			float: left;
		}
		input.act{
			background: red;
			color: #fff;
		}
		ul{
			width: 420px;
			height: 400px;
			float: left;
		}
		ul li{
			width: 420px;
			height: 400px;
			background: red;
			display: none;
			font-size: 50px;
			text-align: center;
			line-height: 400px;
		}
	</style>
	<script>
		window.onload = function(){
			var oBox = document.getElementById('box');
			var aInput = oBox.getElementsByTagName('input');
			var aLi = oBox.getElementsByTagName('li');

			for(var i=0; i<aInput.length; i++){
				aInput[i].index = i;
				aInput[i].onclick = function(){
					for(var j=0; j<aInput.length; j++){
						aInput[j].className = '';
						aLi[j].style.display = 'none';
					}	
					this.className = 'act';
					aLi[this.index].style.display = 'block';
				}
			}
		}
	</script>
</head>
<body>
	<div id="box">
		<input type="button" value="第1个" class="act">
		<input type="button" value="第2个">
		<input type="button" value="第3个">
		<ul>
			<li style="display:block;">1</li>
			<li>2</li>
			<li>3</li>
		</ul>
	</div>
</body>
</html>